﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="DivCenter._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<script>

</script>
    <title>123</title>
        <style type="text/css">
        #fixdiv
        {
        	position: fixed !important;
            position: absolute;
            top:-50%;
            left:-50%;        
            vertical-align:middle;
        }
    </style>
    <!--[if gte IE 5.5]>
<![if lt IE 7]>
<style type="text/css">
div#fixdiv {
  /* IE5.5+/Win - this is more specific than the IE 5.0 version */
  right: auto; bottom: auto;
  left: expression((( document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth )/2 -fixdiv.offsetWidth/2+( ignoreMe = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' );
  top: expression( (( document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight )/2 - fixdiv.offsetHeight/2 +( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' );
}
</style>
<![endif]>
<![endif]-->
</head>
<body>
    <form id="form1" runat="server">
    <div id="fixdiv" style="width: 300px; height: 300px; background-color: Red;">
        123</div>
    <br />1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    </form>
</body>
</html>
